<template>
  <el-cascader
    :value="value"
    :options="options"
    :props="{ expandTrigger: config.trigger }"
    v-bind="config"
    @change="handleChange"
  />
</template>

<script>
import { regionData } from 'element-china-area-data'
export default {
  props: {
    value: {
      type: [Array, String],
      default: ''
    },
    config: {
      type: Object,
      default() {
        return {
          trigger: 'hover'
        }
      }
    }

  },
  data() {
    return {
      options: regionData
    }
  },
  methods: {
    handleChange(value) {
      this.$emit('input', value)
    }
  }
}
</script>

<style>

</style>
